import qs from 'qs'
import http from '../libs/http'

const basicRoute = '/api/organization-type'


export const getOrganizationTypeList = (params) => {
    return http.get(basicRoute, {
        params
    })
}

export const getOrganizationTypeAll = (params) =>{
    return http.get(`${basicRoute}/getlist`, {
        params
    })
}

export const getOrganizationTypeHomeAll = (params) =>{
    return http.get('api/getOrganizationTypeHomeList', {
        params
    })
}

export const addOrganizationType = (data) => {
    return http.post(basicRoute, data)
}

export const editOrganizationType = (id, data) => {
    return http.patch(`${basicRoute}/${id}`, qs.stringify(data))
}

export const deleteOrganizationType = id => {
    return http.delete(`${basicRoute}/${id}`)
}
